package construction.flyweight;

import java.util.HashMap;
import java.util.Map;

public class WebsiteFactory {
    Map<String,Website> map = new HashMap();

    Website getWebsiteCategory(String name){
        if(!map.containsKey(name)){
            map.put(name,new ConcreteWebsite(name));
        }
        return (Website) map.get(name);
    }

    public int size() {
        return map.size();
    }

}
